﻿using Narau.Required_interfaces;

namespace Narau.Common
{
    class Solution
    {
        private string            m_str_solution;
        private ReqIntf_InputBox  m_reqIntfUserEntry;

        public Solution(string strValue, ReqIntf_InputBox intfUserEntry)
        {
            m_str_solution     = strValue;
            m_reqIntfUserEntry = intfUserEntry;
        }

        //-----------------------------------------------------------------------------------
        // Determina si el usuario ha introducido la respuesta correcta para esta solución 
        //-----------------------------------------------------------------------------------
        public bool IsOk()
        {
            bool bOK = (m_reqIntfUserEntry.GetUserEntry() == m_str_solution);
            m_reqIntfUserEntry.SetMark(bOK);
            
            return bOK;
        }
    }
}
